With the abundance of computing devices in modern life, individual users as well as entities like businesses and other organizations have begun to focus on the electrical power that these computing devices use. For a portable computing device, such as laptop computer or a mobile device like a smartphone, monitoring power usage is important to preserve the remaining charge of a battery of the device so that a user can use the device for a longer period of time before having to recharge the battery. For a computing device that a user typically plugs into an electrical outlet, such as a desktop computer or even a laptop computer when not running off a battery, monitoring power usage is important to reduce the overall amount of electrical power that the device uses. This latter concern is particularly relevant for large organizations, such as businesses, which may have hundreds, thousands, or more of such computing devices that all use electrical power for which the organizations have to pay a utility company to provide. Furthermore, such usage of power is an environmental concern, particularly where utility companies employ fossil fuels to generate this power.
A computer program product of an embodiment of the disclosure includes a computer-readable storage medium embodying computer-readable power management code. A processor of a computing device executes the computer-readable power management code. The computer-readable power management code includes first computer-readable code to detect a trigger related to power usage of the computing device that a computer program to be run or running on the computing device causes. The computer-readable power management code includes second computer-readable code to, responsive to detection of the trigger, perform a power-saving action in relation to the computer program to reduce the power usage of the computing device without placing the computing device as a whole into a shutoff, sleep, standby, or hibernation state. The power-saving action is a strictly software-oriented action.
A system of an embodiment of the disclosure includes a processor and a computer-readable medium. The computer-readable medium stores a computer program, and is to store power management computer code. The processor executes the computer program and the power management computer code. The power management computer code detects a trigger. The power management computer code, responsive to detecting the trigger, performs a power-saving action in relation to the computer program to reduce the power usage of the system without placing the system as a whole into a shutoff, sleep, standby, or hibernation state. The power-saving action is a strictly software-oriented action.